Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mui/utils

Package Overview
Dependencies
Maintainers
11
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/utils

Utility functions for React components.

  • 5.16.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9M
decreased by-15.79%
Maintainers
11
Weekly downloads
 
Created

What is @mui/utils?

The @mui/utils package provides a collection of utility functions designed to aid in the development of UI components and applications. These utilities cover a range of functionalities such as deep object manipulation, event handling, and system property helpers, making it easier to implement common tasks in a more efficient and standardized way.

What are @mui/utils's main functionalities?

Deep object manipulation

Allows for the deep merging of two objects, useful for combining default and user-provided configurations.

import { deepmerge } from '@mui/utils';
const obj1 = { a: 1, b: 2 };
const obj2 = { b: 3, c: 4 };
const merged = deepmerge(obj1, obj2);
// Result: { a: 1, b: 3, c: 4 }

Event handling

Facilitates getting the owner document of a node, which is helpful for correctly attaching event listeners in a document-agnostic way.

import { ownerDocument } from '@mui/utils';
const doc = ownerDocument(node);
// Use doc to add or remove event listeners

System property helpers

Provides an enhanced effect hook that uses `useLayoutEffect` on the server to avoid warnings and `useEffect` on the client.

import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
useEnhancedEffect(() => {
  // Effect logic here
}, [deps]);

Other packages similar to @mui/utils

Keywords

FAQs

Package last updated on 30 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc